package com.jslx.utils;

import java.util.HashMap;
import java.util.Map;

/**
 * @author HYL
 * @create 2017-07-22 下午11:14
 **/
public class MapBuilder {

    private Map<String, Object> map = new HashMap<>();

    public MapBuilder and(String key, Object value) {
        map.put(key, value);
        return this;
    }

    public Map<String, Object> build() {
        return map;
    }

    public static MapBuilder with(String key, Object value) {
        MapBuilder mb = new MapBuilder();
        mb.and(key, value);
        return mb;
    }

}
